﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Wintellect.PowerCollections;

namespace PriorityQueue
{
    class PriorityQueue<T>
    {
        private OrderedBag<T> queue;

        public PriorityQueue()
        {
            queue = new OrderedBag<T>();
        }

        public void Enque(T item)
        {
            queue.Add(item);
        }

        public T Deque()
        {
            T item = queue.GetFirst();
            queue.Remove(item);

            return item;
        }

        public int Count()
        {
            return queue.Count;
        }

        public void Remove(T item)
        {
            queue.Remove(item);
        }
    }
}
